Repository navigation
refactor: migrate compressed and sparse attention kernels. - #2804
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87b3df3f83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92dbf5fbe6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ((socVersion_ != platform_ascendc::SocVersion::ASCEND910B) && | ||
| (socVersion_ != platform_ascendc::SocVersion::ASCEND910_93)) { | ||
| OP_LOGE(opName_, "SOC Version[%d] is not support.", (int32_t)socVersion_); | ||
| return GRAPH_FAILED; |
There was a problem hiding this comment.
Align the shared-KV binding with its supported SoCs
On Ascend 950, this check always rejects the device, even though sparse_attn_sharedkv_def.cpp:133 registers ascend950 and the kernel entry point includes an arch35 implementation. The new Python DSV4 adapter unconditionally dispatches shared-KV attention to this private operator, so DeepSeek-V4 execution fails during tiling on 950, including with the default window parameters. Provide consistent 950 tiling support or gate the registration and Python dispatch instead of exposing a backend that necessarily rejects the device.
Useful? React with 👍 / 👎.
| aicNum_ * workspaceParams_->curMm1ResSize * MM1_RES_ELEM_SIZE; | ||
| workspaceSize_ += aicNum_ * workspaceParams_->vec1ResSize * V1_RES_ELEM_SIZE; | ||
|
|
||
| workspaceSize_ += 1024 * 1024 * 1024; // 1024:申请workspace大小 |
There was a problem hiding this comment.
Remove the unused 1 GiB compressor workspace reservation
For every nonempty compressor invocation, this adds 1 GiB after the library workspace and all three scratch buffers have already been counted. Both CompressorKernel::InitWorkspace and CompressorKernelPerf::InitWorkspace only address the pre-MM1, current-MM1, and vector regions; there is no corresponding use of this extra allocation. Consequently, even single-token DeepSeek-V4 decode requires more than 1 GiB of scratch and can encounter avoidable OOM failures when free HBM would otherwise accommodate the actual buffers. Remove the fixed padding or explicitly size any additional required region.
Useful? React with 👍 / 👎.
Summary
xllm-kernel.Validation